package com.website.system.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.website.system.dubboService.DownloadService;
import com.website.system.model.Download;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yanqb
 * @Date 2020-05-21 16:10
 */
@RestController
@RequestMapping("/dubbo/download")
public class DubboController {

    @Reference()
    private DownloadService dubboService;

    @GetMapping("/")
    public Object users(){
        List<Download> list = dubboService.getRankingFour(1);
        return list.toString();
    }
}
